<template>
  <div class="div"> <el-button type="primary">Primary</el-button></div>
  <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"
    background-color="#545c64" text-color="#fff" active-text-color="#ffd04b">
    <el-menu-item index="1"><RouterLink  :to="{name:'main'}">实时状态</RouterLink></el-menu-item>
    <el-menu-item index="2"><RouterLink  :to="{name:'scheme'}">方案配置</RouterLink></el-menu-item>
    <el-menu-item index="3"><RouterLink  :to="{name:'time_table'}">订单管理</RouterLink></el-menu-item>
  </el-menu>
</template>
<script setup>
import { ref } from "vue"
const activeIndex = ref("1")
const handleSelect = (key, keyPath) => {
  activeIndex.value = key
  console.log(key)
}

</script>

<style scoped>
.div {
  height: 50px;
}
a{
  text-decoration: none;
}
</style>